package com.citywithincity.api.mock;

import java.util.List;


import com.citywithincity.db.Db;
import com.damai.annotation.Controller;

@Controller(key = "mock")
public class MockController {

	/**
	 * 添加一个mock
	 */
	public int add(MockData json) {
		return Db.ar(MockData.class).insert(json);
	}
	
	/**
	 * 更新一个mock
	 * @param json
	 * @return
	 */
	public int update(MockData json) {
		return Db.ar(MockData.class).update(json);
	}
	
	/**
	 * 列出mock
	 * @return
	 */
	public List<MockData> mocks(){
		return Db.ar(MockData.class).get();
	}
	
	
	
	
	
}
